package com.dy.lock.screen.dao.impl;

import org.springframework.stereotype.Repository;

import com.dy.lock.screen.dao.GoodsDao;
import com.dy.lock.screen.pojo.GoodsInfo;

@Repository("goodsDao")
public class GoodsDaoImpl extends BaseDaoImpl<GoodsInfo, String> implements
		GoodsDao {

	@Override
	public String getQueryNamespace() {
		return "mybatis.xml.GoodsMapper";
	}

	@Override
	public GoodsInfo queryByPrimaryKey(String goodsid) {
		return this.getSqlSession().selectOne(
				getQueryNamespace() + ".queryByPrimaryKey", goodsid);
	}

	@Override
	public GoodsInfo queryByOrderId(String orderId) {
		return this.getSqlSession().selectOne(
				getQueryNamespace() + ".queryByOrderId", orderId);
	}

}
